package com.topcoder.srm518;

public class Nim {
	private final static int MOD = 1000000007;
	
	public int count(int K, int L) {
		int count = 0;
		
		int pow = 1;
		int exp = 0;		// 2^exp >= L
		while (pow < L) {
			pow *= 2;
			exp++;
		}
		
		int[] dp = new int[pow];
		for (int i=2; i<=L; i++) dp[i] = 1;
		for (int i=2; i*i<=L; i++) {
			if (dp[i] == 0) continue;
			for (int j=2*i; j<=L; j+=i) {
				dp[j] = 0;
			}
		}
		
		
		
		return count;
	}
	
	
}
